API - CoTemplate\Cotpl_loop
system\cotemplate.php at line 1401

Class Cotpl_loop

Cotpl_block
└─Cotpl_loop

public class Cotpl_loop
extends Cotpl_block

CoTemplate FOR loop

Field Summary
protected string

$key

Key variable name (optional)

protected Cotpl_var

$set

Source set/array variable

protected string

$val

Value variable name

Fields inherited from API - CoTemplate\Cotpl_block
blocks, data
Constructor Summary
void

__construct(string header, string code, array index, array path)

Constructs loop block structure from strings

Method Summary
string

__toString()

TPL code representation for debugging

void

parse(XTemplate xtpl, XTemplate tpl)

Overloads parse()

void

reset(mixed dummy, mixed path)

Overloads reset()

string

text(XTemplate tpl)

Actually parses a conditional block and returns parsed contents

Methods inherited from API - CoTemplate\Cotpl_block
__construct, __toString, blocks_toString, compile, getTags, parse, reset, text

Field Detail

system\cotemplate.php at line 1407

key

protected string $key = ''
Key variable name (optional)

system\cotemplate.php at line 1412

set

protected Cotpl_var $set = null
Source set/array variable

system\cotemplate.php at line 1417

val

protected string $val = ''
Value variable name

Constructor Detail

system\cotemplate.php at line 1427

__construct

public void __construct(string header, string code, array index, array path)
Constructs loop block structure from strings
Parameters:
header - Loop header string
code - Loop body
index - CoTemplate index
path - Current block path

Method Detail

system\cotemplate.php at line 1448

__toString

public string __toString()
TPL code representation for debugging
Returns:

system\cotemplate.php at line 1463

parse

public void parse(XTemplate xtpl, XTemplate tpl)
Overloads parse()
Parameters:
xtpl - Reference to XTemplate object

system\cotemplate.php at line 1472

reset

public void reset(mixed dummy, mixed path)
Overloads reset()
Parameters:
dummy - A stub to match Cotpl_block::reset() declaration (Strict mode)

system\cotemplate.php at line 1483

text

public string text(XTemplate tpl)
Actually parses a conditional block and returns parsed contents
Parameters:
tpl - A reference to XTemplate object containing variables
Returns: